/**
*@Author: zt
*@Description: 应急预警接口
*@Date 2024-09-20
*/
import request from '@/http'

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/save',
    data: data
  })
}

// 列表分页查询
export const page = async (data: object) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/page',
    data: data
  })
}

// 单体查询
export const query = async (id: String) => {
  return await request.get({
    url: '/api/bizz/tEmergencyWarning/details/' + id,
  })
}

// 删除
export const del = async (data: Array<any>) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

// 修改
export const updata = async (data: object) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/update',
    data: data
  })
}


// 查询当日应急最高的
export const singleQuery = async (data: object) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/getMaxLevel',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}


// 应急预警解除
export const updateStatus = async (data: Array<any>) => {
  return await request.post({
    url: '/api/bizz/tEmergencyWarning/updateStatus',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}